<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Hello World - Google AJAX Search API Sample</title>
    <link href="http://www.google.com/uds/css/gsearch.css"
        type="text/css" rel="stylesheet"/>
     <script src="http://www.google.com/uds/api?file=uds.js&amp;v=1.0&amp;key=ABQIAAAA8oytSKm7Ah8DbmO_SzJsCBRh-G1zzewIfrHDzTtEzwoqd0gnJRSSdYN5DRAPX81ae5OE5lHJWraseQ" type="text/javascript"></script>
    <script language="Javascript" type="text/javascript">
    //<![CDATA[

    function OnLoad() {
      // Create a search control
      var searchControl = new GSearchControl();

		// create a searcher options object
		// set up for open expansion mode
		// load a searcher with these options	
		var options = new GsearcherOptions();
		options.setExpandMode(GSearchControl.EXPAND_MODE_CLOSED);
		//options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);

      // Add in a full set of searchers
      var localSearch = new GlocalSearch();
      searchControl.addSearcher(localSearch, options);
      searchControl.addSearcher(new GwebSearch(), options);
      searchControl.addSearcher(new GvideoSearch(), options);
      searchControl.addSearcher(new GblogSearch(), options);
      searchControl.addSearcher(new GnewsSearch(), options);

		// site restricted web search with custom label
		// and class suffix
		var siteSearch = new GwebSearch();
		siteSearch.setUserDefinedLabel("Amazon.com");
		siteSearch.setUserDefinedClassSuffix("siteSearch");
		siteSearch.setSiteRestriction("amazon.com");
		searchControl.addSearcher(siteSearch);

      // Set the Local Search center point
      localSearch.setCenterPoint("New York, NY");

		// create a drawOptions object
		var drawOptions = new GdrawOptions();
		
		// tell the searcher to draw itself in linear mode
		//drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED); 
		drawOptions.setDrawMode(GSearchControl.DRAW_MODE_LINEAR);

      // tell the searcher to draw itself and tell it where to attach
      searchControl.draw(document.getElementById("searchcontrol"), drawOptions);

		// attach "powered by Google" branding
		GSearch.getBranding(document.getElementById("branding"));

      // execute an inital search
      searchControl.execute("VW GTI");
    }

    //]]>
    </script>
  </head>
  <body onload="OnLoad()">
	<div id="branding">Loading...</div>
    <div id="searchcontrol"/>
  </body>
</html>
